package lj.jdbcPool.c3p0;

import com.mchange.v2.c3p0.ComboPooledDataSource;

import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.SQLException;

/**
 * @author lj
 * @Description: C3P0
 * @date 2020-11-24 11:59
 * @QQ 851477108
 */


public class C3P0Test2 {
    public static void main(String[] args) throws SQLException {
        //1.创建数据库连接池对象
        DataSource ds  = new ComboPooledDataSource();
        //2. 获取连接对象
        Connection conn = ds.getConnection();

        System.out.println(conn);
    }
}
